<!--
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * date: 2021-09-07 20:25:16
 * @LastEditors: Sam
 * @LastEditTime: 2022-01-20 18:51:57
-->
{include file="common/public/header"}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-card">
            <div class="layui-tab">
                <ul class="layui-tab-title">
                    {foreach name="group_list" item="v" key="k"}
                        <li  {if condition="$k==$inc_type"}class="layui-this"{/if}>
                            <a href="{:url('setting/index',['inc_type'=> $k])}"><span>{$v}</span></a>
                        </li>
                     {/foreach}
                </ul>
                <div class="layui-tab-content">
                  <div class="layui-tab-item layui-show">
                    <form class="layui-form padsome" onSubmit="return false">  
                       
                        <input type="hidden" name="inc_type" value="{$inc_type}">
                        <div class="layui-form-item" style="width: 60%;" >
                            <div class="layui-form-label">网站名称</div>
                            <div class="layui-input-block">
                                <input class="layui-input"  name="site_name"  lay-verify="required"  placeholder="请输入名称"  value="{$config?$config.site_name:''}"/>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <div class="layui-footer" style="left: 0;">
                                    <button class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="">立即提交</button>
                                </div>
                            </div>
                        
                        </div>
                    </form>
                  </div>
                </div>
              </div>
        </div>
    </div>
</div>
{include file="common/public/ueditor" /}
{include file="common/public/umeditor" /}
{include file="common/public/footer" /}
<script>
    layui.extend({
        xmSelect: 'xm-select'
    }).use(['index', 'form', 'layarea', 'laydate', 'xmSelect'], function(){
        var $       = layui.$;
        var form    = layui.form;
        // var xmSelect = layui.xmSelect;
        uploadInit('pic', 'image', '');
        form.render();
        
        // 监听表单提交
        form.on('submit()', function(data){
            Post("{:url('set_handle')}", data.field, function(res) {
                if (res.code == 1) {
                    alert_success(res.msg, function() {
                        parent.layui.table.reload('table', {where: parent.where});
                        close_frame();
                    })
                } else {
                    alert_error(res.msg);
                }
            });
            return false;
        });

});
</script>
